<html>
<title><?echo $name?> - Live Support for website</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK href="styles/main.css" type=text/css rel=stylesheet>
<body leftmargin="0" topmargin="0">
<center>
<form method="post" onSubmit="return checkform(this);">
<table border="0" cellspacing="3" cellpadding="0">
 <tr>
  	<td align="center">
		<a href="<?echo $GLOBALS['website']?>" target="_blank">
		<img src="<?echo getBanner()?>" width="498"  style="border:1px solid #336699" border="0"/>
		</a>
	</td>
  </tr>

<tr>
	<td>
	<table width="100%" class="stform" style="border:1px solid #6888DE">
		<tr>
			<td  align="center" colspan="2">
				<div align="left" style="width:40%">
				<?
				$hascheck=false;
				foreach($listroom as $i => $room)
				{
				?>
				<div>
					<input type="radio" name="chatid" value="<?echo $room['iUserId']?>" 
			<?if($room['iStatus']!=2)echo 'disabled="disabled"'; else if($hascheck==false){echo "checked"; $hascheck=true;}?> />
					<?echo empty($room['cRoomName'])? $room['cUserName'] : $room['cRoomName']?>
					(<?echo ($room['iStatus']==2)? "Online" : "Offline"?>)
				</div>
				<?
				}
				?>
				</div>
			</td>
		</tr>
		 <tr>
			<td align="right" colspan="2">
				<?echo $alert?>
			</td>
		 </tr>
		 <tr>
			<td colspan="2" align="center">
				<?echo $GLOBALS['SUPPORT_PARENT']['cWelcome']?>
			</td>
		</tr>
		 <tr>
			<td align="right" width="30%">
				Your Name *
			</td>
			<td>
				<input type="text" name="username" id="username" style="width:200"/>
			</td>
		 </tr>
		  <tr>
			<td align="right">
				Your Email *
			</td>
			<td>
				<input type="text" name="Email" id="Email" style="width:200"/>
			</td>
		 </tr>
		 <tr>
			<td align="right">
				Your Question *
			</td>
			<td>
				<textarea name="Question" id="Question" style="width:300px; height:100px"></textarea>
			</td>
		 </tr>
		  <tr>
			<td>
			</td>
			<td>
				<input type="submit" value="Start Chat" style="width:100" />
			</td>
		 </tr>
		 <tr>
		 	<td colspan="2" align="right">
				<div style="float:left">Fields marked with * are required</div>
				<a href="chat.php?opt=login">Admin Login</a>
			</td>
		 </tr>
		</table>		
	</td>
</tr>
</table>
</form>
<script>
function checkform(fo)
{
	if(fo.username.value=="")
	{
		alert("Please enter your name!");
		return false;
	}
	if(fo.Email.value=="")
	{
		alert("Please enter your email!");
		return false;
	}
	if(fo.Question.value=="")
	{
		alert("Please enter your Question!");
		return false;
	}	
	return true;
}
document.getElementById("username").focus();
self.resizeTo(550,475);
</script>
</center>
</body>
</html>